<template>
  <div class="di-1">
    <div class="img-12"></div>
    <div class="text-12">智慧直播总览</div>
    <!-- 这里写你的内容 -->
    <div class="xue-1">学生观看次数</div>
    <div class="shu-1">{{ sun1[0]?.value }}</div>
    <div class="zb-1">{{ zsun[0]?.name }}</div>
    <div class="shu-1">{{ zsun[0]?.value }}</div>
  </div>
</template>

<script lang="ts" setup>
import { ref, onMounted } from 'vue'
import { getVideoTotal, getZhzcs } from '@/services/index'
import type { arr1, arrzh } from '@/types'
const zsun = ref<arrzh>([])
const sun1 = ref<arr1>([])
const sun = async () => {
  const res = await getVideoTotal()
  sun1.value = res.data
}
const suns = async () => {
  const res = await getZhzcs()
  zsun.value = res.data
}
onMounted(() => {
  sun()
  suns()
})
</script>

<style lang="scss" scoped>
.di-1 {
  width: 240px;
  height: 420px;
  background-image: url('../../assets/img/z-1.png');
  background-repeat: no-repeat;
  background-size: 100% 100%;
  padding: 10px;
  margin: 0 5px;
  // background: red;
  .img-12 {
    width: 100%;
    height: 20px;
    background-image: url('../../assets/img/t-1.gif');
    background-repeat: no-repeat;
    background-size: 100% 100%;
    margin-bottom: 10px;
  }
  .text-12 {
    color: rgb(255, 255, 255);
    font-weight: bold;
    font-family: 'Microsoft Yahei', Arial, 'sans-serif';
    font-size: 22px;
    text-overflow: ellipsis;
    white-space: nowrap;
    margin-bottom: 40px;
  }
  .xue-1 {
    margin-top: 10px;
    font-size: 18px;
    color: #fff;
  }
  .shu-1 {
    color: #fff;
    margin-bottom: 40px;
  }
  .zb-1 {
    color: #fff;
    font-size: 18px;
  }
}
</style>
